package com.niiwoo.activity.stage.dto.response.investRank;

import java.io.Serializable;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class InvestDetailRespDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6481744093003545782L;

	private Long projectId;

	private String title;

	private Double amount;

	private Double revenue;

	private Integer totalPeriods;

	private String inveDate;

	private String fullSuccessDate;

	private String month;
	
	public static InvestDetailRespDTO toDto(InvestDetail detail){
		
		InvestDetailRespDTO dto=new InvestDetailRespDTO();
		dto.setProjectId(detail.getProjectId());
		dto.setTitle(detail.getProjectName());
		dto.setAmount(detail.getInvestAmount());
		dto.setRevenue(detail.getInvestProfit());
		dto.setTotalPeriods(detail.getDeadLine());
		dto.setInveDate(detail.getInvestDate());
		dto.setFullSuccessDate(detail.getFullDate());
		dto.setMonth(detail.getCreateTimeMonth());
		return dto;
	}

}
